package com.bcxj.Test;

import lombok.Data;

import java.text.DateFormat;
import java.text.spi.DateFormatProvider;
import java.util.Date;

@Data
public class Order {
    public String orderId;
    public long timestamp;
    public double amount;

    public Order() {}

    public Order(String orderId, long timestamp, double amount) {
        this.orderId = orderId;
        this.timestamp = timestamp;
        this.amount = amount;
    }


    @Override
    public String toString() {
        return "Order{" +
                "orderId='" + orderId + '\'' +
                ", timestamp=" + new Date(timestamp) +
                ", amount=" + amount +
                '}';
    }
}
